package worker;


import java.io.IOException;

import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;

import data.Data;

public class Test {
	public static void main(String[] args) throws IOException {
		DBCollection coll = Data.data("domaincraw");
		DBCursor url = coll.find(new BasicDBObject("url","http://iphonedevelopersunited.wordpress.com/feed"));
		
		coll.createIndex(new BasicDBObject("url", -1));
		
		while (url.hasNext()) {
			DBObject dbObject = (DBObject) url.next();
			System.out.println(dbObject);
		}
		
//		coll.remove(url);
	}
	
}
